home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / linklist / source.lha / doc / lSort.3 < prev    next >
Text File  |  1993-08-08  |  1KB  |  54 lines

  1. '.so tmac.clman
  2. .TH "lSort"
  3. .IX lSort
  4. .SH NAME
  5. lSort - Sort a linked list.
  6. .SH SYNOPSIS
  7. int
  8. .BR "lSort" "(id, order, theory, func)"
  9. .br
  10. .RT
  11. .RP
  12. In    int    id    identifier of linked list
  13. .RP
  14. In    int    order    sorting order
  15. .RP
  16. In    int    theory    sorting theory
  17. .RP
  18. In    int    (*func)()    function for comparing the data of 2 nodes
  19. .DT
  20. .SH DESCRIPTION
  21. \fBlSort\fP sorts a linked list in the specified \fIorder\fP, using
  22. the specified \fItheory\fP, and the user defined function \fIfunc\fP,
  23. which compares the data of two nodes. This function must have two
  24. parameters, two pointers to the data of a node. The possible return
  25. values are lSAME, l1LT2 and l2LT1. See the introduction of Generic
  26. Linked List for an example of such a compare function.
  27. .SH PARAMETER DEFINITIONS
  28. .if t .ta 0.2i 1.5i
  29. \fIorder\fP :
  30. .nf
  31.     lASCENDING    'a', 'b', 'c', ...
  32.     lDESCENDING    'z', 'y', 'x', ...
  33. .fi
  34. \fItheory\fP :
  35. .nf
  36.     lBUBBLE    bubble sorting algorithm ...
  37.     lHEAP    heap sorting algorithm ...
  38.     lINSERT    insert sorting algorithm ...
  39.     lQUICK    quick sorting algorithm ...
  40.     lSELECTION    selection sorting algorithm ...
  41. .fi
  42. .SH RETURN CODES
  43. .nf
  44. Return on success :
  45.     lSUCCESS
  46. Return on error :
  47.     lUNKNOWN_ID, lEMPTY_LIST, lWRONG_ORDER, lWRONG_THEORY
  48. .fi
  49. .SH AUTHOR
  50. .nf
  51. Anita Eijs (TNO - Bouw - BouwInformatica)
  52. Shane Brath (University of Wisconsin)
  53. .fi
  54.